<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

	<div id="div1">DIV</div>
	<div class="div1"></div>
	<div class="div1"></div>
	<div class="div1"></div>
	<div class="div1"></div>
	<input type="text" name="inp">
	<input type="text" name="inp">
	<input type="text" name="inp">
	<img alt="" src="">
	<img alt="" src="">
	<img alt="" src="">
	<script type="text/javascript">
		var div1 = document.getElementById('div1');
		var itmes = document.getElementsByClassName('div1')[0];
		var imgTags = document.getElementsByTagName('img');
		var body = document.body;
		var names = document.getElementsByName('inp');
		//ID可以直接拿来用。
		//alert(div1);
		//div1.innerHTML = '我是元素内容innerHTML';
	</script>


</body>
</html>